﻿using System;
using System.Data;
using KPIS.GERP.GFMS.MODEL;
using System.Collections.Generic;

namespace KPIS.GERP.GFMS.IDAL
{
    public interface IDAL_FIM_MoneyRequests
    {
        IList<M_FIM_MoneyRequests> GetFull(Nullable<int> bgm_source_seq
            , Nullable<int> bgm_year, Nullable<int> work_area_seq, Nullable<int> event_seq
            , Nullable<int> contact_seq, Nullable<int> emp_seq, string record_status, bool bReadyToPay);
        IList<M_FIM_MoneyRequests> GetReturnDate(Nullable<int> bgm_source_seq
            , Nullable<int> bgm_year, Nullable<int> work_area_seq, Nullable<int> event_seq
            , Nullable<int> contact_seq, Nullable<int> emp_seq, string record_status, DateTime? dFromDate, DateTime? dToDate, bool bReadyToPay);
        IList<M_FIM_MoneyRequests> GetList(Nullable<int> bgm_source_seq
            , Nullable<int> bgm_year, Nullable<int> work_area_seq, Nullable<int> event_seq
            , Nullable<int> contact_seq, Nullable<int> emp_seq, string filter);
        IList<M_FIM_MoneyRequests> GetPetitionList(Nullable<int> bgm_source_seq
            , Nullable<int> bgm_year, Nullable<int> work_area_seq, Nullable<int> event_seq
            , Nullable<int> contact_seq, Nullable<int> emp_seq, string filter);
        IList<M_FIM_MoneyRequests> GetNotPetition(Nullable<int> bgm_source_seq
            , Nullable<int> bgm_year, Nullable<int> petition_seq, Nullable<int> bgm_exp_grp_seq);
        IList<M_FIM_MoneyRequests> GetNotReturnList(Nullable<int> return_seq
            , Nullable<int> emp_seq, Nullable<int> contact_person_seq);
        M_FIM_MoneyRequests GetNotReturnInfo(Nullable<int> money_req_seq, Nullable<int> return_seq);
        M_FIM_MoneyRequests GetDnDeductInfo(int seq);
        IList<M_HRM_PR_PayrollDtls> GetSalaryDeductList(int money_req_seq);
        M_FIM_MoneyRequests GetInfo(int seq);
        M_FIM_MoneyRequests GetInfo(int seq, int? receive_seq);
        M_FIM_MoneyRequests GetMoneyReqDNInfo(int seq);
        bool HaveAmountExist(int money_req_seq);
        //string SelectRecentInsertedRoleSeq();

        string Insert(M_FIM_MoneyRequests info);
        void Update(M_FIM_MoneyRequests info);
        void Delete(M_FIM_MoneyRequests info);
        void UpdateBidder(M_FIM_MoneyRequests info);
        void UpdateBidderCol(int? BidderColId);
        void UpdateBgmExpGrpSeq(M_FIM_MoneyRequests info);
        void UpdateGlTranSeq(M_FIM_MoneyRequests info);
        void UpdateBorrowAllow(M_FIM_MoneyRequests info);
        void UpdateBorrowReturnDate(int money_req_seq, DateTime real_pay_date);
        void UpdateUseAdvance(string money_req_seq, string use_advance, string remarks, string updated_by);
        void ChangeStatus(M_FIM_MoneyRequests info);

        DataTable Report_Contract(int seq);
        DataTable Report_ContractSub(int seq);

        string GetNextRefNo(Nullable<int> bgm_year, Nullable<int> bgm_source_seq);
        string GetNextBorrowNo(Nullable<int> bgm_year, Nullable<int> bgm_source_seq, string use_advance);
    }
}